package pkg.commands;

import java.awt.Point;

@SuppressWarnings("serial")
public class PlayerCmdSyncPos extends PlayerCmd {
	
	Point pos;
	private boolean request = false;
	public PlayerCmdSyncPos(int id,Point pos)
	{
		this.setPlayerID(id);
		this.pos = pos;
	}
	
	public void executeLocal()
	{
		if(!request)
		  data.setPosition(pos);	
		else
			PlayerCmd.synchPosition(data.getUserID(),data.getPosition());
	}
	
	public void isSynchRequest(boolean request)
	{
		this.request = request;
	}
}
